<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::PointRepresentation&lt; PointT &gt; 模板类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpcl_1_1_point_representation.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-attribs">Protected 属性</a> &#124;
<a href="classpcl_1_1_point_representation-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::PointRepresentation&lt; PointT &gt; 模板类 参考<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p><b><a class="el" href="classpcl_1_1_point_representation.html" title="PointRepresentation provides a set of methods for converting a point structs/object into an n-dimensi...">PointRepresentation</a></b> provides a set of methods for converting a point structs/object into an n-dimensional vector.  
 <a href="classpcl_1_1_point_representation.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="point__representation_8h_source.html">point_representation.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a962da31ea2310724799020d5d891eed8"><td class="memItemLeft" align="right" valign="top"><a id="a962da31ea2310724799020d5d891eed8"></a>
typedef boost::shared_ptr&lt; <a class="el" href="classpcl_1_1_point_representation.html">PointRepresentation</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>Ptr</b></td></tr>
<tr class="separator:a962da31ea2310724799020d5d891eed8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2e8602ddca1e8f6b61a7e3123e45c04"><td class="memItemLeft" align="right" valign="top"><a id="aa2e8602ddca1e8f6b61a7e3123e45c04"></a>
typedef boost::shared_ptr&lt; const <a class="el" href="classpcl_1_1_point_representation.html">PointRepresentation</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ConstPtr</b></td></tr>
<tr class="separator:aa2e8602ddca1e8f6b61a7e3123e45c04"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a6be5889c55b01d606d148b9657d99d90"><td class="memItemLeft" align="right" valign="top"><a id="a6be5889c55b01d606d148b9657d99d90"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_point_representation.html#a6be5889c55b01d606d148b9657d99d90">PointRepresentation</a> ()</td></tr>
<tr class="memdesc:a6be5889c55b01d606d148b9657d99d90"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty constructor <br /></td></tr>
<tr class="separator:a6be5889c55b01d606d148b9657d99d90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a427bbef66f2a2d445334f416f1fb1bf7"><td class="memItemLeft" align="right" valign="top"><a id="a427bbef66f2a2d445334f416f1fb1bf7"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_point_representation.html#a427bbef66f2a2d445334f416f1fb1bf7">~PointRepresentation</a> ()</td></tr>
<tr class="memdesc:a427bbef66f2a2d445334f416f1fb1bf7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty destructor <br /></td></tr>
<tr class="separator:a427bbef66f2a2d445334f416f1fb1bf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39021ff2549ce7dfadf309325452cdb3"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_point_representation.html#a39021ff2549ce7dfadf309325452cdb3">copyToFloatArray</a> (const <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &amp;p, float *out) const =0</td></tr>
<tr class="memdesc:a39021ff2549ce7dfadf309325452cdb3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy point data from input point to a float array. This method must be overriden in all subclasses.  <a href="classpcl_1_1_point_representation.html#a39021ff2549ce7dfadf309325452cdb3">更多...</a><br /></td></tr>
<tr class="separator:a39021ff2549ce7dfadf309325452cdb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61f671d7aa579871e8085ff941197cc1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_point_representation.html#a61f671d7aa579871e8085ff941197cc1">isTrivial</a> () const</td></tr>
<tr class="memdesc:a61f671d7aa579871e8085ff941197cc1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether this point representation is trivial. It is trivial if and only if the following conditions hold:  <a href="classpcl_1_1_point_representation.html#a61f671d7aa579871e8085ff941197cc1">更多...</a><br /></td></tr>
<tr class="separator:a61f671d7aa579871e8085ff941197cc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7349905def3f55233c947bb24e465fff"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_point_representation.html#a7349905def3f55233c947bb24e465fff">isValid</a> (const <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &amp;p) const</td></tr>
<tr class="memdesc:a7349905def3f55233c947bb24e465fff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Verify that the input point is valid.  <a href="classpcl_1_1_point_representation.html#a7349905def3f55233c947bb24e465fff">更多...</a><br /></td></tr>
<tr class="separator:a7349905def3f55233c947bb24e465fff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8abd9892e75cd4999f883e5a6647c089"><td class="memTemplParams" colspan="2">template&lt;typename OutputType &gt; </td></tr>
<tr class="memitem:a8abd9892e75cd4999f883e5a6647c089"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classpcl_1_1_point_representation.html#a8abd9892e75cd4999f883e5a6647c089">vectorize</a> (const <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &amp;p, OutputType &amp;out) const</td></tr>
<tr class="memdesc:a8abd9892e75cd4999f883e5a6647c089"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert input point into a vector representation, rescaling by <em>alpha</em>.  <a href="classpcl_1_1_point_representation.html#a8abd9892e75cd4999f883e5a6647c089">更多...</a><br /></td></tr>
<tr class="separator:a8abd9892e75cd4999f883e5a6647c089"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a640ec71cc593dc67377df208e7e1558e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_point_representation.html#a640ec71cc593dc67377df208e7e1558e">setRescaleValues</a> (const float *rescale_array)</td></tr>
<tr class="memdesc:a640ec71cc593dc67377df208e7e1558e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the rescale values to use when vectorizing points  <a href="classpcl_1_1_point_representation.html#a640ec71cc593dc67377df208e7e1558e">更多...</a><br /></td></tr>
<tr class="separator:a640ec71cc593dc67377df208e7e1558e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5fe6b9c44fcd631a86aac9a1e6dc541f"><td class="memItemLeft" align="right" valign="top"><a id="a5fe6b9c44fcd631a86aac9a1e6dc541f"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_point_representation.html#a5fe6b9c44fcd631a86aac9a1e6dc541f">getNumberOfDimensions</a> () const</td></tr>
<tr class="memdesc:a5fe6b9c44fcd631a86aac9a1e6dc541f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the number of dimensions in the point's vector representation. <br /></td></tr>
<tr class="separator:a5fe6b9c44fcd631a86aac9a1e6dc541f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:a5a8d2c82167160ec74077b612b236c77"><td class="memItemLeft" align="right" valign="top"><a id="a5a8d2c82167160ec74077b612b236c77"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_point_representation.html#a5a8d2c82167160ec74077b612b236c77">nr_dimensions_</a></td></tr>
<tr class="memdesc:a5a8d2c82167160ec74077b612b236c77"><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of dimensions in this point's vector (i.e. the "k" in "k-D") <br /></td></tr>
<tr class="separator:a5a8d2c82167160ec74077b612b236c77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c1e194235db969264453a4531b407fc"><td class="memItemLeft" align="right" valign="top"><a id="a6c1e194235db969264453a4531b407fc"></a>
std::vector&lt; float &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_point_representation.html#a6c1e194235db969264453a4531b407fc">alpha_</a></td></tr>
<tr class="memdesc:a6c1e194235db969264453a4531b407fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">A vector containing the rescale factor to apply to each dimension. <br /></td></tr>
<tr class="separator:a6c1e194235db969264453a4531b407fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ada3acdb7732a09aeaabb0bced153cd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_point_representation.html#a5ada3acdb7732a09aeaabb0bced153cd">trivial_</a></td></tr>
<tr class="memdesc:a5ada3acdb7732a09aeaabb0bced153cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicates whether this point representation is trivial. It is trivial if and only if the following conditions hold:  <a href="classpcl_1_1_point_representation.html#a5ada3acdb7732a09aeaabb0bced153cd">更多...</a><br /></td></tr>
<tr class="separator:a5ada3acdb7732a09aeaabb0bced153cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><h3>template&lt;typename PointT&gt;<br />
class pcl::PointRepresentation&lt; PointT &gt;</h3>

<p><b><a class="el" href="classpcl_1_1_point_representation.html" title="PointRepresentation provides a set of methods for converting a point structs/object into an n-dimensi...">PointRepresentation</a></b> provides a set of methods for converting a point structs/object into an n-dimensional vector. </p>
<dl class="section note"><dt>注解</dt><dd>This is an abstract class. Subclasses must set nr_dimensions_ to the appropriate value in the constructor and provide an implemention of the pure virtual copyToFloatArray method. </dd></dl>
<dl class="section author"><dt>作者</dt><dd>Michael Dixon </dd></dl>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a39021ff2549ce7dfadf309325452cdb3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a39021ff2549ce7dfadf309325452cdb3">&#9670;&nbsp;</a></span>copyToFloatArray()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classpcl_1_1_point_representation.html">pcl::PointRepresentation</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::copyToFloatArray </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &amp;&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float *&#160;</td>
          <td class="paramname"><em>out</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Copy point data from input point to a float array. This method must be overriden in all subclasses. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p</td><td>The input point </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>A pointer to a float array. </td></tr>
  </table>
  </dd>
</dl>

<p>在 <a class="el" href="classpcl_1_1_default_feature_representation.html#a6370adf6138277430cb05c4f9a5136f3">pcl::DefaultFeatureRepresentation&lt; VFHSignature308 &gt;</a>, <a class="el" href="classpcl_1_1_default_point_representation_3_01_unique_shape_context1960_01_4.html#ac6f1aaee69b795bfd6cb6d92cae46c3c">pcl::DefaultPointRepresentation&lt; UniqueShapeContext1960 &gt;</a>, <a class="el" href="classpcl_1_1_default_point_representation_3_01_s_h_o_t352_01_4.html#a2710df1e3a2bcf9c34d5b392d99e7f6e">pcl::DefaultPointRepresentation&lt; SHOT352 &gt;</a>, <a class="el" href="classpcl_1_1_default_point_representation_3_01_s_h_o_t1344_01_4.html#a4614abc47829b257f83f73634d603b88">pcl::DefaultPointRepresentation&lt; SHOT1344 &gt;</a>, <a class="el" href="classpcl_1_1_default_point_representation_3_01_shape_context1980_01_4.html#a6a8f7466e078940027a576e4c05f201d">pcl::DefaultPointRepresentation&lt; ShapeContext1980 &gt;</a>, <a class="el" href="classpcl_1_1_default_point_representation_3_01_p_p_f_signature_01_4.html#aa0234aeef051b986558391c5f43e3163">pcl::DefaultPointRepresentation&lt; PPFSignature &gt;</a>, <a class="el" href="classpcl_1_1_default_feature_representation.html#a6370adf6138277430cb05c4f9a5136f3">pcl::DefaultFeatureRepresentation&lt; PPFSignature &gt;</a>, <a class="el" href="classpcl_1_1_default_point_representation_3_01_point_x_y_z_i_01_4.html#a75b280e832ae7f5d09c82afd559e2a40">pcl::DefaultPointRepresentation&lt; PointXYZI &gt;</a>, <a class="el" href="classpcl_1_1_default_point_representation_3_01_point_x_y_z_01_4.html#ad4a3ef016ed214628a351c544f870c3e">pcl::DefaultPointRepresentation&lt; PointXYZ &gt;</a>, <a class="el" href="classpcl_1_1registration_1_1_transformation_validation_euclidean_1_1_my_point_representation.html#ae2b84ec0e924107739305cc92b093d26">pcl::registration::TransformationValidationEuclidean&lt; PointSource, PointTarget, Scalar &gt;::MyPointRepresentation</a>, <a class="el" href="classpcl_1_1_default_point_representation_3_01_point_normal_01_4.html#a81d34fad250c97050dd523978df29859">pcl::DefaultPointRepresentation&lt; PointNormal &gt;</a>, <a class="el" href="classpcl_1_1_custom_point_representation.html#a0498b77f6e88e67754fd35bdac410a19">pcl::CustomPointRepresentation&lt; PointDefault &gt;</a>, <a class="el" href="classpcl_1_1_default_feature_representation.html#a6370adf6138277430cb05c4f9a5136f3">pcl::DefaultFeatureRepresentation&lt; PointDefault &gt;</a>, <a class="el" href="classpcl_1_1_default_point_representation.html#a8698ce63ed3e4ce4e660c8628992fdba">pcl::DefaultPointRepresentation&lt; PointDefault &gt;</a>, <a class="el" href="classpcl_1_1_default_feature_representation.html#a6370adf6138277430cb05c4f9a5136f3">pcl::DefaultFeatureRepresentation&lt; PFHSignature125 &gt;</a>, <a class="el" href="classpcl_1_1_default_feature_representation.html#a6370adf6138277430cb05c4f9a5136f3">pcl::DefaultFeatureRepresentation&lt; PFHRGBSignature250 &gt;</a>, <a class="el" href="classpcl_1_1_default_feature_representation.html#a6370adf6138277430cb05c4f9a5136f3">pcl::DefaultFeatureRepresentation&lt; NormalBasedSignature12 &gt;</a>, <a class="el" href="classpcl_1_1_default_point_representation_3_01_narf36_01_4.html#af33e706499155b73858442680005811e">pcl::DefaultPointRepresentation&lt; Narf36 &gt;</a> , 以及 <a class="el" href="classpcl_1_1_default_feature_representation.html#a6370adf6138277430cb05c4f9a5136f3">pcl::DefaultFeatureRepresentation&lt; FPFHSignature33 &gt;</a> 内被实现.</p>

</div>
</div>
<a id="a61f671d7aa579871e8085ff941197cc1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a61f671d7aa579871e8085ff941197cc1">&#9670;&nbsp;</a></span>isTrivial()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classpcl_1_1_point_representation.html">pcl::PointRepresentation</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::isTrivial </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns whether this point representation is trivial. It is trivial if and only if the following conditions hold: </p>
<ul>
<li>the relevant data consists only of float values</li>
<li>the vectorize operation directly copies the first nr_dimensions_ elements of PointT to the out array</li>
<li>sizeof(PointT) is a multiple of sizeof(float) In short, a trivial point representation converts the input point to a float array that is the same as if the point was reinterpret_casted to a float array of length nr_dimensions_ . </li>
</ul>
<div class="fragment"><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;{ <span class="keywordflow">return</span> <a class="code" href="classpcl_1_1_point_representation.html#a5ada3acdb7732a09aeaabb0bced153cd">trivial_</a> &amp;&amp; <a class="code" href="classpcl_1_1_point_representation.html#a6c1e194235db969264453a4531b407fc">alpha_</a>.empty (); }</div>
<div class="ttc" id="aclasspcl_1_1_point_representation_html_a5ada3acdb7732a09aeaabb0bced153cd"><div class="ttname"><a href="classpcl_1_1_point_representation.html#a5ada3acdb7732a09aeaabb0bced153cd">pcl::PointRepresentation::trivial_</a></div><div class="ttdeci">bool trivial_</div><div class="ttdoc">Indicates whether this point representation is trivial. It is trivial if and only if the following co...</div><div class="ttdef"><b>Definition:</b> point_representation.h:71</div></div>
<div class="ttc" id="aclasspcl_1_1_point_representation_html_a6c1e194235db969264453a4531b407fc"><div class="ttname"><a href="classpcl_1_1_point_representation.html#a6c1e194235db969264453a4531b407fc">pcl::PointRepresentation::alpha_</a></div><div class="ttdeci">std::vector&lt; float &gt; alpha_</div><div class="ttdoc">A vector containing the rescale factor to apply to each dimension.</div><div class="ttdef"><b>Definition:</b> point_representation.h:61</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a7349905def3f55233c947bb24e465fff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7349905def3f55233c947bb24e465fff">&#9670;&nbsp;</a></span>isValid()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classpcl_1_1_point_representation.html">pcl::PointRepresentation</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::isValid </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &amp;&#160;</td>
          <td class="paramname"><em>p</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Verify that the input point is valid. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">p</td><td>The point to validate </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;      {</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <span class="keywordtype">bool</span> is_valid = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160; </div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="classpcl_1_1_point_representation.html#a5ada3acdb7732a09aeaabb0bced153cd">trivial_</a>)</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        {</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;          <span class="keyword">const</span> <span class="keywordtype">float</span>* temp = <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><span class="keywordtype">float</span>*<span class="keyword">&gt;</span>(&amp;p);</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160; </div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;          <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="classpcl_1_1_point_representation.html#a5a8d2c82167160ec74077b612b236c77">nr_dimensions_</a>; ++i)</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;          {</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;            <span class="keywordflow">if</span> (!pcl_isfinite (temp[i]))</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;            {</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;              is_valid = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;              <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;            }</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;          }</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        }</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        {</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;          <span class="keywordtype">float</span> *temp = <span class="keyword">new</span> <span class="keywordtype">float</span>[<a class="code" href="classpcl_1_1_point_representation.html#a5a8d2c82167160ec74077b612b236c77">nr_dimensions_</a>];</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;          <a class="code" href="classpcl_1_1_point_representation.html#a39021ff2549ce7dfadf309325452cdb3">copyToFloatArray</a> (p, temp);</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160; </div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;          <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="classpcl_1_1_point_representation.html#a5a8d2c82167160ec74077b612b236c77">nr_dimensions_</a>; ++i)</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;          {</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;            <span class="keywordflow">if</span> (!pcl_isfinite (temp[i]))</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;            {</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;              is_valid = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;              <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;            }</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;          }</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;          <span class="keyword">delete</span> [] temp;</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        }</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        <span class="keywordflow">return</span> (is_valid);</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;      }</div>
<div class="ttc" id="aclasspcl_1_1_point_representation_html_a39021ff2549ce7dfadf309325452cdb3"><div class="ttname"><a href="classpcl_1_1_point_representation.html#a39021ff2549ce7dfadf309325452cdb3">pcl::PointRepresentation::copyToFloatArray</a></div><div class="ttdeci">virtual void copyToFloatArray(const PointT &amp;p, float *out) const =0</div><div class="ttdoc">Copy point data from input point to a float array. This method must be overriden in all subclasses.</div></div>
<div class="ttc" id="aclasspcl_1_1_point_representation_html_a5a8d2c82167160ec74077b612b236c77"><div class="ttname"><a href="classpcl_1_1_point_representation.html#a5a8d2c82167160ec74077b612b236c77">pcl::PointRepresentation::nr_dimensions_</a></div><div class="ttdeci">int nr_dimensions_</div><div class="ttdoc">The number of dimensions in this point's vector (i.e. the &quot;k&quot; in &quot;k-D&quot;)</div><div class="ttdef"><b>Definition:</b> point_representation.h:59</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a640ec71cc593dc67377df208e7e1558e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a640ec71cc593dc67377df208e7e1558e">&#9670;&nbsp;</a></span>setRescaleValues()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_point_representation.html">pcl::PointRepresentation</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::setRescaleValues </td>
          <td>(</td>
          <td class="paramtype">const float *&#160;</td>
          <td class="paramname"><em>rescale_array</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the rescale values to use when vectorizing points </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">rescale_array</td><td>The array/vector of rescale values. Can be of any type that implements the [] operator. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;      {</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;        <a class="code" href="classpcl_1_1_point_representation.html#a6c1e194235db969264453a4531b407fc">alpha_</a>.resize (<a class="code" href="classpcl_1_1_point_representation.html#a5a8d2c82167160ec74077b612b236c77">nr_dimensions_</a>);</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="classpcl_1_1_point_representation.html#a5a8d2c82167160ec74077b612b236c77">nr_dimensions_</a>; ++i)</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;          <a class="code" href="classpcl_1_1_point_representation.html#a6c1e194235db969264453a4531b407fc">alpha_</a>[i] = rescale_array[i];</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;      }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a8abd9892e75cd4999f883e5a6647c089"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8abd9892e75cd4999f883e5a6647c089">&#9670;&nbsp;</a></span>vectorize()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<div class="memtemplate">
template&lt;typename OutputType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_point_representation.html">pcl::PointRepresentation</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::vectorize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &amp;&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">OutputType &amp;&#160;</td>
          <td class="paramname"><em>out</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert input point into a vector representation, rescaling by <em>alpha</em>. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p</td><td>the input point </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>The output vector. Can be of any type that implements the [] operator. </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;      {</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="keywordtype">float</span> *temp = <span class="keyword">new</span> <span class="keywordtype">float</span>[<a class="code" href="classpcl_1_1_point_representation.html#a5a8d2c82167160ec74077b612b236c77">nr_dimensions_</a>];</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;        <a class="code" href="classpcl_1_1_point_representation.html#a39021ff2549ce7dfadf309325452cdb3">copyToFloatArray</a> (p, temp);</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="classpcl_1_1_point_representation.html#a6c1e194235db969264453a4531b407fc">alpha_</a>.empty ())</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        {</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;          <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="classpcl_1_1_point_representation.html#a5a8d2c82167160ec74077b612b236c77">nr_dimensions_</a>; ++i)</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;            out[i] = temp[i];</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        }</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        {</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;          <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="classpcl_1_1_point_representation.html#a5a8d2c82167160ec74077b612b236c77">nr_dimensions_</a>; ++i)</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;            out[i] = temp[i] * <a class="code" href="classpcl_1_1_point_representation.html#a6c1e194235db969264453a4531b407fc">alpha_</a>[i];</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        }</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        <span class="keyword">delete</span> [] temp;</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;      }</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="a5ada3acdb7732a09aeaabb0bced153cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5ada3acdb7732a09aeaabb0bced153cd">&#9670;&nbsp;</a></span>trivial_</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classpcl_1_1_point_representation.html">pcl::PointRepresentation</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::trivial_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Indicates whether this point representation is trivial. It is trivial if and only if the following conditions hold: </p>
<ul>
<li>the relevant data consists only of float values</li>
<li>the vectorize operation directly copies the first nr_dimensions_ elements of PointT to the out array</li>
<li>sizeof(PointT) is a multiple of sizeof(float) In short, a trivial point representation converts the input point to a float array that is the same as if the point was reinterpret_casted to a float array of length nr_dimensions_ . This value says that this representation can be trivial; it is only trivial if <a class="el" href="classpcl_1_1_point_representation.html#a640ec71cc593dc67377df208e7e1558e" title="Set the rescale values to use when vectorizing points">setRescaleValues()</a> has not been set. </li>
</ul>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>common/include/pcl/<a class="el" href="point__representation_8h_source.html">point_representation.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><a class="el" href="classpcl_1_1_point_representation.html">PointRepresentation</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
